![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
phosphor-domutil
Advanced tools
Utilities for working with the DOM.
Prerequisites
npm install --save phosphor-domutil
Prerequisites
git clone https://github.com/phosphorjs/phosphor-domutil.git
cd phosphor-domutil
npm install
Rebuild
npm run clean
npm run build
Follow the source build instructions first.
# run tests in Firefox
npm test
# run tests in Chrome
npm run test:chrome
# run tests in IE
npm run test:ie
Follow the source build instructions first.
npm run docs
Navigate to docs/index.html
.
The runtime versions which are currently known to work are listed below. Earlier versions may also work, but come with no guarantees.
Follow the package install instructions first.
npm install --save-dev browserify browserify-css
browserify myapp.js -o mybundle.js
Note: This module is fully compatible with Node/Babel/ES6/ES5. Simply omit the type declarations when using a language other than TypeScript.
Cursor Override:
import {
overrideCursor
} from 'phosphor-domutil';
// force the cursor to be 'wait' for the entire document
let override = overrideCursor('wait');
// clear the override by disposing the return value
override.dispose();
Hit Testing:
import {
hitTest
} from 'phosphor-domutil';
let div = document.createElement('div');
div.style.position = 'absolute';
div.style.left = '0px';
div.style.top = '0px';
div.style.width = '100px';
div.style.height = '100px';
document.body.appendChild(div);
hitTest(div, 50, 50); // true
hitTest(div, 150, 150); // false
Box Sizing:
import {
boxSizing
} from 'phosphor-domutil';
let div = document.createElement('div');
div.style.borderTop = 'solid 10px black';
document.body.appendChild(div);
let sizing = boxSizing(div);
sizing.borderTop; // 10
sizing.paddingLeft; // 0
// etc...
Size Limits:
import {
sizeLimits
} from 'phosphor-domutil';
let div = document.createElement('div');
div.style.minWidth = '90px';
document.body.appendChild(div);
let limits = sizeLimits(div);
limits.minWidth; // 90
limits.maxHeight; // Infinity
// etc...
Custom Drag Data:
import {
clearDragData, getDragData, setDragData
} from 'phosphor-domutil';
// pseudo-code
class SomeDragSource {
evtDragStart(event: DragEvent): void {
setDragData(event, 'application/x-my-custom-data', { foo: 12, bar: 42 });
}
evtDragEnd(event: DragEvent): void {
clearDragData(event);
}
}
// pseudo-code
class SomeDropTarget {
evtDrop(event: DragEvent): void {
let data = getDragData(event, 'application/x-my-custom-data');
console.log(data); // { foo: 12, bar: 42 }
}
}
FAQs
Utilities for working with the DOM.
The npm package phosphor-domutil receives a total of 24 weekly downloads. As such, phosphor-domutil popularity was classified as not popular.
We found that phosphor-domutil demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.